#!/usr/bin/python
from __future__ import with_statement
import common
from widgets import Table

common.setupEnv(globals())

usage = "Backup DB"

parser = common.StockieOptionParser(usage=usage)
parser.add_posarg('backup_dir', dest='backup_dir')
(options, args) = parser.parse_args()

def main():
    with common.withValidation() as wv:
        interface.backup(options.backup_dir)

main()
